package com.beteng.su.betengsu.bean;



import android.os.Parcel;
import android.os.Parcelable;

import java.io.Serializable;

import io.realm.RealmObject;
import io.realm.annotations.PrimaryKey;

/**
 * Created by yy on 2017/8/14.
 */
public class AreaBean extends RealmObject implements Serializable, Parcelable {





    /**
     * AreaTypeID : 3
     * CreationDate : /Date(1386464295620)/
     * FullName : 云南省德宏傣族景颇族自治州潞西市
     * ID : 3054
     * Ids : 533103
     * IsDeleted : true
     * LastEditDate : /Date(1386464295620)/
     * LastRefreshTime : /Date(1436490314520)/
     * LevelPath : 0.2908.3052.3054.
     * Name : 潞西市
     * ParentID : 3052
     * PostCode : 0
     * PurposeName : 云南潞西市
     */
    private int AreaTypeID;
    private String FullName;
    @PrimaryKey
    private int ID;
    private int Ids;
    private boolean IsDeleted;
    private String LevelPath;
    private String Name;
    private int ParentID;
    private int PostCode;
    private String PurposeName;

    public int getAreaTypeID() {
        return AreaTypeID;
    }

    public void setAreaTypeID(int areaTypeID) {
        AreaTypeID = areaTypeID;
    }

    public String getFullName() {
        return FullName;
    }

    public void setFullName(String fullName) {
        FullName = fullName;
    }

    public int getID() {
        return ID;
    }

    public void setID(int ID) {
        this.ID = ID;
    }

    public int getIds() {
        return Ids;
    }

    public void setIds(int ids) {
        Ids = ids;
    }

    public boolean isDeleted() {
        return IsDeleted;
    }

    public void setDeleted(boolean deleted) {
        IsDeleted = deleted;
    }

    public String getLevelPath() {
        return LevelPath;
    }

    public void setLevelPath(String levelPath) {
        LevelPath = levelPath;
    }

    public String getName() {
        return Name;
    }

    public void setName(String name) {
        Name = name;
    }

    public int getParentID() {
        return ParentID;
    }

    public void setParentID(int parentID) {
        ParentID = parentID;
    }

    public int getPostCode() {
        return PostCode;
    }

    public void setPostCode(int postCode) {
        PostCode = postCode;
    }

    public String getPurposeName() {
        return PurposeName;
    }

    public void setPurposeName(String purposeName) {
        PurposeName = purposeName;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(this.AreaTypeID);
        dest.writeString(this.FullName);
        dest.writeInt(this.ID);
        dest.writeInt(this.Ids);
        dest.writeByte(this.IsDeleted ? (byte) 1 : (byte) 0);
        dest.writeString(this.LevelPath);
        dest.writeString(this.Name);
        dest.writeInt(this.ParentID);
        dest.writeInt(this.PostCode);
        dest.writeString(this.PurposeName);
    }

    public AreaBean() {
    }

    protected AreaBean(Parcel in) {
        this.AreaTypeID = in.readInt();
        this.FullName = in.readString();
        this.ID = in.readInt();
        this.Ids = in.readInt();
        this.IsDeleted = in.readByte() != 0;
        this.LevelPath = in.readString();
        this.Name = in.readString();
        this.ParentID = in.readInt();
        this.PostCode = in.readInt();
        this.PurposeName = in.readString();
    }

    public static final Parcelable.Creator<AreaBean> CREATOR = new Parcelable.Creator<AreaBean>() {
        @Override
        public AreaBean createFromParcel(Parcel source) {
            return new AreaBean(source);
        }

        @Override
        public AreaBean[] newArray(int size) {
            return new AreaBean[size];
        }
    };
}
